#include<graphics.h>
#include<conio.h>
#include<math.h>

#define High 480
#define Width 640
#difinePI 3.14159

int main()
{
	initgraph(Width,High);
	int center_x,center_y;
	center_x=Width/2;
	center_y=High/2;
	int secondLength;
	secondLength=Width/5;
	
	int secondEnd_x,seconeEnd_y;
	float secondAngle;
	SYSTEMTIME ti;
	
	while(1)
	{
		GetlocalTime(&ti);
		
		secondAngle=ti.wSecond*2*PI/60;
		
		secondEnd_x=center_x+secondLength*sin(secondAngle);
	    secondEnd_y=center_y-secondLength*cos(secondAngle); 
		
		setlinestyle(PS_SOLID,2);
		setcolor(WHITH);
		line(center_x,center_y,secondEnd_x,secondEnd_y);
		
		sleep(100);
		
		setcolor(BLACK);
		line(center_x,center_y,secondEnd_x,secondEnd_y);
	}
	getch();
	closegraph();
	return 0;
}
	
	
	 
